﻿using System.Data.Entity.ModelConfiguration;
using RealtReview.DataAccess.Entities;

namespace RealtReview.DataAccess.Mappings
{
    public class ApartmentMap : EntityTypeConfiguration<Apartment>
    {
        public ApartmentMap()
        {
            HasMany(e => e.Reviews)
            .WithRequired(e => e.Apartment)
            .WillCascadeOnDelete(false);
        }
    }
}